<template>
  <f-page-layout title="表单应用" class="wrapper" :actions="buttons">
    <f-dy-score
      style="height: 100%; overflow-y: auto; width: 210mm; margin: 0 auto"
      ref="form"
      :config="preview"></f-dy-score>
  </f-page-layout>
</template>
<script setup lang="ts">
import { http } from 'fok-ui';
import { ref } from 'vue';
import { reactive } from 'vue';
const form = ref();
const buttons = reactive([
  {
    label: '重置数据源',
    click: () => {
      preview.items = getItems();
    }
  },
  {
    label: '保存',
    click: () => {
      form.value.submit();
    }
  }
]);
const getItems = () => [
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177856',
    formItemPid: '0',
    elementId: '1909512588407644160',
    internalNo: 'HDSD00.02.690',
    elementNo: null,
    showName: '机构名称',
    elementName: '机构名称',
    dictCode: null,
    value: null,
    controlType: {
      code: '1',
      desc: '纯文本输入域'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: false,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177857',
    formItemPid: '0',
    elementId: '1909512927437430784',
    internalNo: 'HDSD00.02.366',
    elementNo: null,
    showName: '科室名称',
    elementName: '科室名称',
    dictCode: null,
    value: null,
    controlType: {
      code: '1',
      desc: '纯文本输入域'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177858',
    formItemPid: '0',
    elementId: '1909513438152663040',
    internalNo: 'HDSD00.02.028',
    elementNo: null,
    showName: '病床号',
    elementName: '病床号',
    dictCode: null,
    value: null,
    controlType: {
      code: '4',
      desc: '数字类型'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177859',
    formItemPid: '0',
    elementId: '1909513693778714624',
    internalNo: 'HDSD00.02.246',
    elementNo: null,
    showName: '患者姓名',
    elementName: '患者姓名',
    dictCode: null,
    value: null,
    controlType: {
      code: '1',
      desc: '纯文本输入域'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177860',
    formItemPid: '0',
    elementId: '1909513893268201472',
    internalNo: 'HDSD00.02.095',
    elementNo: null,
    showName: '出生日期',
    elementName: '出生日期',
    dictCode: null,
    value: null,
    controlType: {
      code: '3',
      desc: '日期时间格式'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177861',
    formItemPid: '0',
    elementId: '1909514177390354432',
    internalNo: 'HDSD00.02.653',
    elementNo: null,
    showName: '性别',
    elementName: '性别',
    dictCode: 'SLXBDM',
    value: null,
    controlType: {
      code: '7',
      desc: '单选'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177862',
    formItemPid: '0',
    elementId: '1909514441786695680',
    internalNo: 'HDSD00.02.415',
    elementNo: null,
    showName: '年龄',
    elementName: '年龄',
    dictCode: null,
    value: null,
    controlType: {
      code: '4',
      desc: '数字类型'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177863',
    formItemPid: '0',
    elementId: '1909514926090395648',
    internalNo: 'new000379',
    elementNo: null,
    showName: '病历号',
    elementName: '病历号',
    dictCode: null,
    value: null,
    controlType: {
      code: '1',
      desc: '纯文本输入域'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177864',
    formItemPid: '0',
    elementId: '1909518968891940864',
    internalNo: 'HDSD00.02.379',
    elementNo: null,
    showName: '临床诊断',
    elementName: '临床诊断',
    dictCode: null,
    value: null,
    controlType: {
      code: '1',
      desc: '纯文本输入域'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177865',
    formItemPid: '0',
    elementId: '1909519265987076096',
    internalNo: 'HDSD00.02.488',
    elementNo: null,
    showName: '入观日期',
    elementName: '入观日期',
    dictCode: null,
    value: null,
    controlType: {
      code: '3',
      desc: '日期时间格式'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177866',
    formItemPid: '0',
    elementId: '1909519762789801984',
    internalNo: 'HDSD00.02.424',
    elementNo: null,
    showName: '评估日期',
    elementName: '评估日期',
    dictCode: null,
    value: null,
    controlType: {
      code: '3',
      desc: '日期时间格式'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177868',
    formItemPid: '1909859504509177867',
    elementId: '1909528353953370112',
    internalNo: 'new001784',
    elementNo: null,
    showName: '压力性损伤-感知',
    elementName: '压力性损伤-感知',
    dictCode: 'ECA_YLXSS-GZ',
    value: null,
    controlType: {
      code: '7',
      desc: '单选'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: '4',
    evalItemValueList: [
      {
        code: '01',
        descs: '没有改变',
        score: '4',
        dict: null,
        elementNo: 'new001784',
        valueTo: null
      },
      {
        code: '02',
        descs: '轻度受限',
        score: '3',
        dict: null,
        elementNo: 'new001784',
        valueTo: null
      },
      {
        code: '03',
        descs: '大部分受限',
        score: '2',
        dict: null,
        elementNo: 'new001784',
        valueTo: null
      },
      {
        code: '04',
        descs: '完全受限',
        score: '1',
        dict: null,
        elementNo: 'new001784',
        valueTo: null
      }
    ],
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: true
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177869',
    formItemPid: '1909859504509177867',
    elementId: '1909528543246503936',
    internalNo: 'new001785',
    elementNo: null,
    showName: '压力性损伤-活动能力',
    elementName: '压力性损伤-活动能力',
    dictCode: 'EAC_YLXSS-HDNL',
    value: null,
    controlType: {
      code: '7',
      desc: '单选'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: '4',
    evalItemValueList: [
      {
        code: '01',
        descs: '经常步行',
        score: '4',
        dict: null,
        elementNo: 'new001785',
        valueTo: null
      },
      {
        code: '02',
        descs: '可偶尔步行',
        score: '3',
        dict: null,
        elementNo: 'new001785',
        valueTo: null
      },
      {
        code: '03',
        descs: '局限于轮椅活动',
        score: '2',
        dict: null,
        elementNo: 'new001785',
        valueTo: null
      },
      {
        code: '04',
        descs: '卧床不起',
        score: '1',
        dict: null,
        elementNo: 'new001785',
        valueTo: null
      }
    ],
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: true
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177870',
    formItemPid: '1909859504509177867',
    elementId: '1909528670791094272',
    internalNo: 'new001786',
    elementNo: null,
    showName: '压力性损伤-移动能力',
    elementName: '压力性损伤-移动能力',
    dictCode: 'EAC_YLXSS-YDNL',
    value: null,
    controlType: {
      code: '7',
      desc: '单选'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: '4',
    evalItemValueList: [
      {
        code: '01',
        descs: '不受限',
        score: '4',
        dict: null,
        elementNo: 'new001786',
        valueTo: null
      },
      {
        code: '02',
        descs: '轻度受限',
        score: '3',
        dict: null,
        elementNo: 'new001786',
        valueTo: null
      },
      {
        code: '03',
        descs: '严重受限',
        score: '2',
        dict: null,
        elementNo: 'new001786',
        valueTo: null
      },
      {
        code: '04',
        descs: '完全受限',
        score: '1',
        dict: null,
        elementNo: 'new001786',
        valueTo: null
      }
    ],
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: true
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177871',
    formItemPid: '1909859504509177867',
    elementId: '1909528869638852608',
    internalNo: 'new001787',
    elementNo: null,
    showName: '压力性损伤-营养',
    elementName: '压力性损伤-营养',
    dictCode: 'EAC_YLXSS-YY',
    value: null,
    controlType: {
      code: '7',
      desc: '单选'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: '4',
    evalItemValueList: [
      {
        code: '01',
        descs: '营养摄入良好',
        score: '4',
        dict: null,
        elementNo: 'new001787',
        valueTo: null
      },
      {
        code: '02',
        descs: '营养摄入适当',
        score: '3',
        dict: null,
        elementNo: 'new001787',
        valueTo: null
      },
      {
        code: '03',
        descs: '营养摄入不足',
        score: '2',
        dict: null,
        elementNo: 'new001787',
        valueTo: null
      },
      {
        code: '04',
        descs: '重度营养摄入不足',
        score: '1',
        dict: null,
        elementNo: 'new001787',
        valueTo: null
      }
    ],
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: true
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177872',
    formItemPid: '1909859504509177867',
    elementId: '1909529251932884992',
    internalNo: 'new001788',
    elementNo: null,
    showName: '压力性损伤-剪切和摩擦力',
    elementName: '压力性损伤-剪切和摩擦力',
    dictCode: 'EAC_YLXSS-JQHMCL',
    value: null,
    controlType: {
      code: '7',
      desc: '单选'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: '3',
    evalItemValueList: [
      {
        code: '01',
        descs: '无明显问题',
        score: '3',
        dict: null,
        elementNo: 'new001788',
        valueTo: null
      },
      {
        code: '02',
        descs: '有潜在问题',
        score: '2',
        dict: null,
        elementNo: 'new001788',
        valueTo: null
      },
      {
        code: '03',
        descs: '有此问题',
        score: '1',
        dict: null,
        elementNo: 'new001788',
        valueTo: null
      }
    ],
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: true
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504509177873',
    formItemPid: '1909859504509177867',
    elementId: '1909529404307755008',
    internalNo: 'new001789',
    elementNo: null,
    showName: '压力性损伤-潮湿',
    elementName: '压力性损伤-潮湿',
    dictCode: 'EAC_YLXSS-CS',
    value: null,
    controlType: {
      code: '7',
      desc: '单选'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: '4',
    evalItemValueList: [
      {
        code: '01',
        descs: '很少潮湿',
        score: '4',
        dict: null,
        elementNo: 'new001789',
        valueTo: null
      },
      {
        code: '02',
        descs: '偶尔潮湿',
        score: '3',
        dict: null,
        elementNo: 'new001789',
        valueTo: null
      },
      {
        code: '03',
        descs: '经常潮湿',
        score: '2',
        dict: null,
        elementNo: 'new001789',
        valueTo: null
      },
      {
        code: '04',
        descs: '持久潮湿',
        score: '1',
        dict: null,
        elementNo: 'new001789',
        valueTo: null
      }
    ],
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: true
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372160',
    formItemPid: '0',
    elementId: '1909520976948535296',
    internalNo: 'templateTotalScore',
    elementNo: null,
    showName: '总得分',
    elementName: '总得分',
    dictCode: null,
    value: null,
    controlType: {
      code: '1',
      desc: '纯文本输入域'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372161',
    formItemPid: '0',
    elementId: '1909522320258277376',
    internalNo: 'new000063',
    elementNo: null,
    showName: '评估者签名',
    elementName: '评估者签名',
    dictCode: null,
    value: null,
    controlType: {
      code: '1',
      desc: '纯文本输入域'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372162',
    formItemPid: '0',
    elementId: '1909523092891017216',
    internalNo: 'test0009',
    elementNo: null,
    showName: '护士长签名',
    elementName: '护士长签名',
    dictCode: null,
    value: null,
    controlType: {
      code: '1',
      desc: '纯文本输入域'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372163',
    formItemPid: '0',
    elementId: '1909524210144595968',
    internalNo: 'new001772',
    elementNo: null,
    showName: '科护士长督查签名',
    elementName: '科护士长督查签名',
    dictCode: null,
    value: null,
    controlType: {
      code: '1',
      desc: '纯文本输入域'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372164',
    formItemPid: '0',
    elementId: '1909524501166379008',
    internalNo: 'new001775',
    elementNo: null,
    showName: '护理部督查签名',
    elementName: '护理部督查签名',
    dictCode: null,
    value: null,
    controlType: {
      code: '1',
      desc: '纯文本输入域'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372165',
    formItemPid: '0',
    elementId: '1909524910673055744',
    internalNo: 'new001790',
    elementNo: null,
    showName: '压力性损伤-护理措施',
    elementName: '压力性损伤-护理措施',
    dictCode: 'EAC_YLXSS-HLCS',
    value: null,
    controlType: {
      code: '8',
      desc: '多选'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372166',
    formItemPid: '0',
    elementId: '1909525137853337600',
    internalNo: 'new001791',
    elementNo: null,
    showName: '压力性损伤-效果评价',
    elementName: '压力性损伤-效果评价',
    dictCode: 'EAC_YLXSS-XGPJ',
    value: null,
    controlType: {
      code: '7',
      desc: '单选'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372167',
    formItemPid: '0',
    elementId: '1909527871260282880',
    internalNo: 'new000608',
    elementNo: null,
    showName: '记录日期',
    elementName: '记录日期',
    dictCode: null,
    value: null,
    controlType: {
      code: '3',
      desc: '日期时间格式'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372168',
    formItemPid: '0',
    elementId: '1909525617107095552',
    internalNo: 'new001770',
    elementNo: null,
    showName: '是否告知',
    elementName: '是否告知',
    dictCode: 'EAC_SFGZ',
    value: null,
    controlType: {
      code: '7',
      desc: '单选'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372169',
    formItemPid: '0',
    elementId: '1909526434249789440',
    internalNo: 'new001774',
    elementNo: null,
    showName: '告知时间',
    elementName: '告知时间',
    dictCode: null,
    value: null,
    controlType: {
      code: '3',
      desc: '日期时间格式'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372170',
    formItemPid: '0',
    elementId: '1909527136489525248',
    internalNo: 'HDSD00.02.234',
    elementNo: null,
    showName: '患者/家属签字',
    elementName: '患者/家属签字',
    dictCode: null,
    value: null,
    controlType: {
      code: '1',
      desc: '纯文本输入域'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  },
  {
    check: false,
    level: null,
    nodeType: null,
    id: '1909859504513372171',
    formItemPid: '0',
    elementId: '1909527443630018560',
    internalNo: 'HDSD00.02.164',
    elementNo: null,
    showName: '与患者关系',
    elementName: '与患者关系',
    dictCode: 'JTGXDM',
    value: null,
    controlType: {
      code: '7',
      desc: '单选'
    },
    nodeTypes: {
      code: '2',
      desc: '节点'
    },
    scopeSex: {
      code: '0',
      desc: '不限'
    },
    scopeAge: null,
    specifics: null,
    isSelect: false,
    isEnabled: true,
    isSystem: false,
    options: null,
    formIndex: 0,
    evalItemValue: null,
    evalItemValueList: null,
    hasChild: false,
    children: null,
    isKeyValue: false,
    isReadonly: false,
    isRequired: false,
    isOverride: false,
    isScoreItem: false
  }
];

const preview = reactive({
  mainTitle: '阜康医院',
  title: '_留观患者压力性损伤风险评估表及预防措施记录单',
  origin: {},
  topForm: {
    config: {
      colSpan: 6,
      layout: 'horizontal',
      columns: [
        { field: 'HDSD00.02.366', type: 'input', label: '科室名称' },
        { field: 'HDSD00.02.028', type: 'input', label: '病床号' },
        { field: 'HDSD00.02.246', type: 'input', label: '患者姓名' },
        { field: 'HDSD00.02.095', type: 'date', label: '出生年月' },
        { field: 'HDSD00.02.653', type: 'select', label: '性别' },
        { field: 'HDSD00.02.415', type: 'input', label: '年龄' },
        { field: 'new000379', type: 'input', label: '病历号' },
        {
          span: 24,
          field: 'line',
          fnRender: `h('div',{style:"border-top:1px solid #ccc;padding-bottom:16px"})`
        },
        { field: 'HDSD00.02.465', type: 'input', label: '诊断' },
        { field: 'HDSD00.02.461', type: 'date', label: '入观日期' }
      ]
    }
  },

  items: getItems(),
  scoreRule: [
    {
      id: '1870286986538758144',
      ruleNo: '120241200000040',
      name: '留观患者压力性损伤风险评估表及预防措施记录单',
      ruleDesc: null,
      isOnly: true,
      docTypeId: '1869302254103511040',
      totalScore: 23.0,
      elementId: '1870308350985351168',
      elementName: 'Padua评分表-风险等级',
      scoreRuleDetails: [
        {
          id: '1895284001060261888',
          scoreRuleId: '1870286986538758144',
          code: '01',
          gradeName: '高危',
          scoreLowest: 30.0,
          scoreUpper: 100.0,
          disposePropose: null,
          comments: '危险'
        },
        {
          id: '1895284001060261889',
          scoreRuleId: '1870286986538758144',
          code: '02',
          gradeName: '低危',
          scoreLowest: 0.0,
          scoreUpper: 30.0,
          disposePropose: null,
          comments: '一般'
        }
      ],
      scoreRuleChild: []
    }
  ]
});
</script>

<style lang="scss">
.wrapper {
  height: 100vh;
}
</style>
